package com.whj.apiboss.controller;

import com.whj.apiboss.service.CarService;
import com.whj.internalcommon.dto.Car;
import com.whj.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/14 - 01 - 14 - 12:08 
 * @Description: com.whj.apiboss.controller
 */

@RestController
public class CarController {

    @Autowired
    private CarService carService;

    /**
     * 添加车辆
     * @param car
     * @return
     */
    @PostMapping("/car")
    public ResponseResult addCar(@RequestBody Car car){
        return carService.addCar(car);
    }
}
